<?php 
use Yii\helpers\Html;
use backend\components\SideNavWidget;
?>
<div class="col-md-2">
    <?php
    //左侧菜单1
    $menuItem1 = [];
    if ($access = Yii::$app->params['access']) {
        isset($access['SYSTEM']['INDEX']) && $menuItem1[] = ['label' => '站点设置', 'url' => ['/system/index']];
        isset($access['SYSTEM']['USER']) && $menuItem1[] = ['label' => '用户设置', 'url' => ['/system/userreg']];
        isset($access['SYSTEM']['COURSE']) && $menuItem1[] = ['label' => '课程设置', 'url' => ['/system/course']];
        isset($access['SYSTEM']['OPERATE']) && $menuItem1[] = ['label' => '运营设置', 'url' => ['/system/operate']];
        isset($access['SYSTEM']['COIN']) && $menuItem1[] = ['label' => '账务设置', 'url' => ['/system/coin']];
        isset($access['SYSTEM']['APP']) && $menuItem1[] = ['label' => '移动端设置', 'url' => ['/system/app']];
    } else {
        $menuItem1 = [
            ['label' => '站点设置', 'url' => ['/system/index']],
            ['label' => '用户设置', 'url' => ['/system/userreg']],
            ['label' => '课程设置', 'url' => ['/system/course']],
            ['label' => '运营设置', 'url' => ['/system/operate']],
            ['label' => '账务设置', 'url' => ['/system/coin']],
            ['label' => '移动端设置', 'url' => ['/system/app']],
        ];
    }
    
    
    echo SideNavWidget::widget([
        'options' => ['class' => 'list-group'],
        'items' => $menuItem1,
    ]);

    //左侧菜单2
    $menuItem2 = [];
    if ($access = Yii::$app->params['access']) {
        isset($access['SYSTEM']['BACKUPS']) && $menuItem2[] = ['label' => '优化和备份', 'url' => ['/system/backups']];
        isset($access['SYSTEM']['IPBLACK']) && $menuItem2[] = ['label' => 'IP黑名单', 'url' => ['/system/ipblack']];
        isset($access['SYSTEM']['LOGS']) && $menuItem2[] = ['label' => '系统日志', 'url' => ['/system/logs']];
    }
    $menuItem2 = [
        ['label' => '优化和备份', 'url' => ['/system/backups']],
        ['label' => 'IP黑名单', 'url' => ['/system/ipblack']],
        ['label' => '系统日志', 'url' => ['/system/logs']],
    ];
    
    echo SideNavWidget::widget([
        'options' => ['class' => 'list-group'],
        'items' => $menuItem2,
    ]);

    ?>
</div>